﻿using AutoMapper;
using Jinjia.Approve.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using Jinjia.Approve.Entity.Entity;
using Jinjia.Approve.Entity.Entity.JJFlow;
using Jinjia.Approve.Model.Input;
using Jinjia.Approve.Model.VM;
using Jinjia.Approve.Model.VM.JJFlow;

namespace Jinjia.Approve.Model.AutoMapperProfile
{
    public class JJFlowCommentProfile : Profile
    {
        public JJFlowCommentProfile() : base()
        {
            CreateMap<jj_flow_comment_tbl, JJFlowCommentVM>()
                .ForMember(des => des.id, opt => opt.MapFrom(x => x.id))
                .ForMember(des => des.create_time, opt => opt.MapFrom(x => x.create_time))
                .ForMember(des => des.create_user_id, opt => opt.MapFrom(x => x.create_user_id))
                .ForMember(des => des.update_time, opt => opt.MapFrom(x => x.update_time))
                .ForMember(des => des.comment, opt => opt.MapFrom(x => x.comment))
                .ForMember(des => des.node_name, opt => opt.MapFrom(x => x.node_name))
                .ForMember(des => des.node_action, opt => opt.MapFrom(x => x.node_action))
                .ForMember(des => des.is_append, opt => opt.MapFrom(x => x.is_append))
                .ForMember(des => des.modular_key, opt => opt.MapFrom(x => x.modular_key))
                .ForMember(des => des.biz_order_id, opt => opt.MapFrom(x => x.biz_order_id))
                .ReverseMap();
            
            CreateMap<JJFlowCommentCreateInput, jj_flow_comment_tbl>();
        }
    }
}
